#pragma once
#include <Rz/Object.h>
#include "../Node.h"

namespace Rz { namespace Graphics { namespace Scene { namespace Lights {

enum class LightType
{
	None = 0,
	PointLight = 1,
	DirectionalLight = 2,
};

class LightNode :
	public Node
{
	public:
		RZ_RTTI(Rz::Graphics::Scene::Lights, LightNode);
		RZ_RTTI_IMPLEMENTS(Node);
		RZ_RTTI_END;

		LightNode(LightType lightType)
			: Node(NodeType::Light)
			, _lightType(lightType)
			, _active(true)
			, _fallOff(100.0f)
		{

		}

		virtual LightType GetLightType() const { return _lightType; }
		virtual void SetLightType(LightType lightType) { _lightType = lightType; }
		 
		virtual bool IsActive() const { return _active; }
		virtual void SetActive(bool active) { _active = active; }
		
		virtual f32 GetFallOff() const { return _fallOff; }
		virtual void SetFallOff(f32 fallOff) { _fallOff = fallOff; }
		
		virtual const Math::Vector3& GetLocation() const { return _location; }
		virtual void SetLocation(const Math::Vector3& location) { _location = location; }
		
		virtual const Math::Vector3& GetColor() const { return _color; }
		virtual void SetColor(const Math::Vector3& color) { _color = color; }

	private:
		LightType _lightType;
		bool _active;
		f32 _fallOff;
		Math::Vector3 _location;
		Math::Vector3 _color;
};

} } } }
